	#include("/common/include/include.html")
<style>
	.breadcrumb li{
		float:left;
	}
</style>
<div class="admin-main">
	<blockquote class="layui-elem-quote">
					<span>主页<span><span>/</span><a href="#(ctx??)/admin/model/getListPage">模型管理</a><span>/</span><span class="curr">模型</span>
					<div class="func-right">
						<a href="javascript:;" class="layui-btn layui-btn-small" id="add">
							<i class="layui-icon">&#xe608;</i> 添加新模型
						</a>
					</div>
	</blockquote>
	<div class="site-block-full main-full">
		<fieldset><legend>数据列表</legend>
			<table class="site-table table-hover" lay-even>
				  <thead>
					    <tr><th style="width: 12px;padding-left: 15px;"><input type="checkbox" id="selected-all"></th><th>模型标识</th><th>模型名称</th><th>模型版本</th><th>创建时间</th><th>最后更新时间</th><th>操作</th></tr> 
				  </thead>
				  <tbody id = "tableBody"></tbody>
			</table>           
		  <div id="pages" class = "pages"></div>
		</fieldset>
	</div>
</div>
		<!--模板-->
		<script type="text/html" id="conTemp">
				{{# layui.each(d.data, function(index, item){ }}
					<tr>
						<td><input type="checkbox" class="icheckbox_flat-green"></td>
						<td>{{ item.KEY_?item.KEY_:"" }}</td>
						<td>{{ item.NAME_?item.NAME_:"" }}</td>
						<td>{{ item.VERSION_?item.VERSION_:"" }}</td>
						<td>{{ item.CREATE_TIME_?item.CREATE_TIME_:"" }}</td>
						<td>{{ item.LAST_UPDATE_TIME_?item.LAST_UPDATE_TIME_:"" }}</td>
						<td>
							<a href="/detail-1" target="_blank" class="layui-btn layui-btn-normal layui-btn-mini">预览</a>
							<a href="{{ctx}}/processEditor/modeler.html?modelId={{item.ID_}}" class="layui-btn layui-btn-mini">编辑</a>
							<a href="/manage/article_edit_1" class="layui-btn layui-btn-mini">部署</a>
							<a href="javascript:;" data-id="1" data-opt="del" class="layui-btn layui-btn-danger layui-btn-mini">删除</a>
						</td>
					</tr>
				{{# }); }}
		</script>

<script>
layui.config({
	  base: ctx+'/common/js/'
}).use(['tree','ajax','paging'], function(){
		 ajax = layui.ajax;
		 tree = layui.tree;
		 paging = layui.paging();
		//分页
		getPageData("");
		 
});

function getPageData(pid){
	paging.init({
		url: ctx+"/admin/model/listData",  //地址
		elem: '#tableBody',
		tempElem: '#conTemp',  //模块容器
		pageConfig: {        //分页参数配置
			elem: '#pages',  //分页容器
			pageSize: 10,     //分页大小
			pid:pid
		},
		success:function(){   //渲染成功的回调
			//alert('渲染成功');
		},
		fail:function(msg){       //获取数据失败的回调
			//alert('获取数据失败')
		},
		complate:function(){     //完成的回调
			//alert('处理完成');
		}
	});
}


</script>